<?php
/**
 * RedCross Application
 *
 * @copyright Copyright (c) 2010, Kristian Stokke Tryggestad, Rune Vikestad, Andreas Flaten Wist, Simen Nicolai Echholt, Ole Henrik Jahren
 */


class Admin_Form_Member_Email extends RedCross_Form
{
  public function init()
  {
    $this->addElement('text', 'email', array(
      'filters'    => array('StringTrim'),
      'validators'  => array(
        array('StringLength', true, array(6, 60)),
        array('EmailAddress', true),
                array('UniqueEmail', true),
            ),
            'required'   => true,
            'label'   => 'Adresse'
    ));

    $this->addElement('submit',  Admin_MemberController::SUBMIT_EMAIL, array(
            'required' => true,
            'ignore'   => true,
            'label'    => 'Legg til epost',
        ));

        $this->getElement(Admin_MemberController::SUBMIT_EMAIL)->setDecorators($this->_buttonElementDecorators);
  }
}